package com.ggb.reactive.domain.entity

import com.fasterxml.jackson.annotation.JsonFormat
import io.swagger.v3.oas.annotations.media.Schema
import lombok.Data
import lombok.NoArgsConstructor
import org.springframework.data.annotation.Id
import org.springframework.data.relational.core.mapping.Table
import java.math.BigDecimal
import java.time.Instant

@Table("shopping_cart")
@Data
@NoArgsConstructor
@Schema(title="购物车实体 ShoppingCart")

data class ShoppingCart(
    @Id
    var id:Long?=null,
    @Schema(description = "名称")
    var name:String?=null,
    //用户id
    @Schema(description = "用户id")
    var userId:Long?=null,
    //菜品id
    @Schema(description = "菜品id")
    var dishId:Long?=null,
    //套餐id
    @Schema(description = "套餐id")
    var setmealId:Long?=null,
    //数量
    @Schema(description = "数量")
    var number:Int?=null,
    //菜品价格
    @Schema(description = "金额")
    var amount:BigDecimal?=null,
    //口味
    @Schema(description = "口味")
    var dishFlavor:String?=null,
    //描述信息
    @Schema(description = "图片")
    var image:String?=null,

    //创建时间
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-6")
    var createTime:Instant?=null,
)
